<?php
class ViewController {

	private $full;
	function __construct($full = true) {
		$this->full = $full;
	}
	function __destruct() {
	}

	function render($func, $data = null, array $metadata = array(), $admin = false) {
		foreach ($metadata as $key => $value) {
			$$key = $value;
		}
		if($this->full) {
			require 'inc/header.php';
		}

		require 'views/' . $func . '.php';

		if($this->full) {
			require 'inc/footer.php';
		}
	}

}

